
// 所有的静态属性(包括静态函数)不可被继承
// 所有对象(class-level)上的静态属性和静态函数仅属于该对象(class-level)本身

function Teacher( id , name , gender ){
    this.id = id ;
    this.name = name ;
    this.gender = gender ;
}

let t = new Teacher( 1001 , '张三丰' , 108 );
// let keys = Teacher.keys( t ); // TypeError: Teacher.keys is not a function
let keys = Object.keys( t );
console.log( keys );

// let keys = Teacher.values( t );  // TypeError: Teacher.values is not a function
let values = Object.values( t );
console.log( values );

let entries = Object.entries( t );
console.log( entries );

console.log( '- - - - - - - - - - - - - - - - - - - - - - - -' );

class Course {
    constructor(id,name){
        this.id = id ;
        this.name = name ;
    }
}

let c = new Course( 2002 , '数据结构与算法(C语言)' );
console.log( c );

// console.log( Course.keys( c ) ); // TypeError: Course.keys is not a function
console.log( Object.keys( c ) );
console.log( Object.values( c ) );
console.log( Object.entries( c ) );